<%--
  Created by IntelliJ IDEA.
  User: JackVictor
  Date: 2023/12/21
  Time: 14:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>商家认证</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<script>
    //按钮1
    function showinfo_0(){
        showNotification('您已用此注册文件注册了店铺，请勿重复操作!', 5000)
    }
    //按钮2
    function showinfo_2(){
        showNotification('店铺注册失败', 5000)
    }
    //提示信息
    function showNotification(message, duration) {
        var notification = document.createElement('div');
        notification.className = 'notification';
        notification.textContent = message;
        document.body.appendChild(notification);
        setTimeout(function () {
            notification.style.opacity = 0;
            setTimeout(function () {
                document.body.removeChild(notification);
            }, 3000);
        }, duration);
    }

</script>
<body>
<%
    int error_code=1;
    Integer code = (Integer) request.getAttribute("error_code");
    if(code!=null){
        error_code=code.intValue();
        if(error_code==0){
            //您已用此注册文件注册了店铺，请勿重复操作!%>
<script>showinfo_0()</script>
<%
}else if(error_code==2){
    //店铺注册失败%>
<script>showinfo_2()</script>
<%
        }
    }
%>
<form action="certificate" method="post" enctype="multipart/form-data">
    <p style="text-align: center;font-size: 20px">店铺名称:<input type="text" name="mname"></p>
    <p style="text-align: center;font-size: 20px">注册手机号:<input type="text" name="m_phone"></p>
    <p style="text-align: center;font-size: 20px;">店铺简介:<textarea name="m_intro" rows="5" cols="40"></textarea></p>
    <p style="text-align: center;font-size: 20px">注册文件:<input type="file" name="certifi" value="上传图片" accept="image/*"></p>
    <p style="text-align: center">
        <input style="font-size: 20px" type="submit" value="注册店铺"><br>
    </p>
</form>
</body>
</html>
